//
//  BaseViewController.swift
//  Spookiness
//
//  Created by 腾億 on 2017/12/5.
//  Copyright © 2017年 tml. All rights reserved.
//

import UIKit

class BaseViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        //导航栏相关设置
        navigationController?.navigationBar.setBackgroundImage(#imageLiteral(resourceName: "nav_bg"), for: .default)
        navigationController?.navigationBar.shadowImage = UIImage() // shadowImage 就是那根 1px 的细线
        //导航栏按钮颜色
        navigationController?.navigationBar.tintColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
        //导航栏字体颜色以及大小
        navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.white , NSAttributedStringKey.font: UIFont.systemFont(ofSize: 17)]
        
        if #available(iOS 11.0, *) {
            UIScrollView.appearance().contentInsetAdjustmentBehavior = .never
        } else {
            automaticallyAdjustsScrollViewInsets = false
        }
        // Do any additional setup after loading the view.
    }

    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        //设置状态栏颜色
        UIApplication.shared.statusBarStyle = .lightContent
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

}



